package com.hjm.project.merchantInfo.schedule.service.impl;

import java.util.List;
import com.hjm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.merchantInfo.schedule.mapper.MerchantScheduleMapper;
import com.hjm.project.merchantInfo.schedule.domain.MerchantSchedule;
import com.hjm.project.merchantInfo.schedule.service.IMerchantScheduleService;
import com.hjm.common.utils.text.Convert;

/**
 * 商户附Service业务层处理
 * 
 * @author LOVE
 * @date 2020-11-25
 */
@Service
public class MerchantScheduleServiceImpl implements IMerchantScheduleService 
{
    @Autowired
    private MerchantScheduleMapper merchantScheduleMapper;

    /**
     * 查询商户附
     * 
     * @param merno 商户附ID
     * @return 商户附
     */
    @Override
    public MerchantSchedule selectMerchantScheduleById(String merno)
    {
        return merchantScheduleMapper.selectMerchantScheduleById(merno);
    }

    /**
     * 查询商户附列表
     * 
     * @param merchantSchedule 商户附
     * @return 商户附
     */
    @Override
    public List<MerchantSchedule> selectMerchantScheduleList(MerchantSchedule merchantSchedule)
    {
        return merchantScheduleMapper.selectMerchantScheduleList(merchantSchedule);
    }

    /**
     * 新增商户附
     * 
     * @param merchantSchedule 商户附
     * @return 结果
     */
    @Override
    public int insertMerchantSchedule(MerchantSchedule merchantSchedule)
    {
        merchantSchedule.setCreateTime(DateUtils.getNowDate());
        return merchantScheduleMapper.insertMerchantSchedule(merchantSchedule);
    }

    /**
     * 修改商户附
     * 
     * @param merchantSchedule 商户附
     * @return 结果
     */
    @Override
    public int updateMerchantSchedule(MerchantSchedule merchantSchedule)
    {
        return merchantScheduleMapper.updateMerchantSchedule(merchantSchedule);
    }

    /**
     * 删除商户附对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMerchantScheduleByIds(String ids)
    {
        return merchantScheduleMapper.deleteMerchantScheduleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商户附信息
     * 
     * @param merno 商户附ID
     * @return 结果
     */
    @Override
    public int deleteMerchantScheduleById(String merno)
    {
        return merchantScheduleMapper.deleteMerchantScheduleById(merno);
    }
}
